import request from "@/utils/request";

// 获取比赛列表
export const getMatchesList = (data) => {
	return request({
		url: "/matches/list",
		method: "GET",
		params: data
	});
};
// /matches/create

export const createMatchesList = (data) => {
	return request({
		url: "/matches/create",
		method: "post",
		data: data
	});
};
// /matches/addMatchRecord
export const addMatchRecord = (data) => {
	return request({
		url: "/matches/addMatchRecord",
		method: "post",
		data: data
	});
};
// /matches/getMatchRecord/{matchId}
export const getMatchRecord = (matchId) => {
	return request({
		url: `/matches/getMatchRecord/${matchId}`,
		method: "get"
	});
};
// /matches/delete/{{id}}
export const deleteMatchRecord = (id) => {
  return request({
    url: `/matches/delete/${id}`,
    method: "get"
  });
};
// /matches/deleteMatchRecord/{{id}}}
export const deleteMatchRecordById = (id) => {
  return request({
    url: `/matches/deleteMatchRecord/${id}`,
    method: "get"
  });
};
